﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
	<!-- Resource dictionary entries should be defined here. -->
	 
	 <LinearGradientBrush x:Key="NormalBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#727272" Offset="0"/>
		<GradientStop Color="#4c4c4c" Offset="1"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="OverBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#da5e69" Offset="0"/>
		<GradientStop Color="#d12e27" Offset="1"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="ClickBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#d22828" Offset="1"/>
		<GradientStop Color="#b00000" Offset="0"/>
	</LinearGradientBrush>
	
	
	
	<LinearGradientBrush x:Key="GlassBrush" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#96FFFFFF" Offset="0"/>
		<GradientStop Color="#28FFFFFF" Offset="0.5"/>
		<GradientStop Color="#00FFFFFF" Offset="0.5"/>
	</LinearGradientBrush>
	
	<LinearGradientBrush x:Key="DisabledBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#f4f4f4" Offset="0"/>
		<GradientStop Color="#d7d7d7" Offset="0.7"/>
		<GradientStop Color="#c2c2c2" Offset="1"/>
	</LinearGradientBrush>
	
	<SolidColorBrush x:Key="OuterBorderDisabled" Color="#cfcfcf"/>
	<SolidColorBrush x:Key="InnerBorderDisabled" Color="#b8b8b8"/>
	 
	 <SolidColorBrush x:Key="NormalOuterBorder" Color="#7a7a7a"/>
	<SolidColorBrush x:Key="NormalInnerBorder" Color="#454545"/>
	 
	 

    <LinearGradientBrush x:Key="ScrollBarButtonsBackground" EndPoint="1,0" StartPoint="0,0">
        <GradientStop Color="#727272" Offset="0"/>
		<GradientStop Color="#4c4c4c" Offset="1"/>
    </LinearGradientBrush>



    <LinearGradientBrush x:Key="HoverBackground" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Color="#da5e69" Offset="0"/>
		<GradientStop Color="#d12e27" Offset="1"/>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="VerticalHoverBackground" StartPoint="1,0" EndPoint="0,0">
        <GradientStop Color="#da5e69" Offset="0"/>
		<GradientStop Color="#d12e27" Offset="1"/>
    </LinearGradientBrush>



<LinearGradientBrush x:Key="PressedBackground" EndPoint="0,1" StartPoint="0,0">
		<GradientStop Color="#d22828" Offset="1"/>
		<GradientStop Color="#b00000" Offset="0"/>
	</LinearGradientBrush>





    <SolidColorBrush x:Key="ScrollBarOuterBorder" Color="#454545"/>
    <SolidColorBrush x:Key="ScrollBarInnerBorder" Color="#FFFFFF"/>

    <SolidColorBrush x:Key="ScrollBarDisabledBackground" Color="#F4F4F4"/>

    <LinearGradientBrush x:Key="HorizontalScrollBarButtonsBackground" EndPoint="0,1" StartPoint="0,0">
        <GradientStop Color="#727272" Offset="0"/>
		<GradientStop Color="#4c4c4c" Offset="1"/>
    </LinearGradientBrush>



    <Style x:Key="ScrollBarLineButtonHorizontal" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border 
            Name="OuterBorder"
            Margin="0" 
            CornerRadius="3" 
            BorderBrush="{StaticResource ScrollBarOuterBorder}"
            BorderThickness="1">
                        <Border 
		            Name="Border"
		            Margin="0" 
		            CornerRadius="2" 
		            Background="{StaticResource HorizontalScrollBarButtonsBackground}"
		            BorderBrush="{StaticResource ScrollBarInnerBorder}"
		            BorderThickness="1">
                            <Path 
	              HorizontalAlignment="Center"
	              VerticalAlignment="Center"
	              Fill="{StaticResource ScrollBarInnerBorder}"
	              Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource HoverBackground}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBackground}" />
                        </Trigger>
                        <!--<Trigger Property="IsEnabled" Value="false">
                            <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
                        </Trigger>-->
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border 
            Name="OuterBorder"
            Margin="0" 
            CornerRadius="3" 
            BorderBrush="{StaticResource ScrollBarOuterBorder}"
            BorderThickness="1">
                        <Border 
	            Name="Border"
	            Margin="0" 
	            CornerRadius="2" 
	            Background="{StaticResource ScrollBarButtonsBackground}"
	            BorderBrush="{StaticResource ScrollBarInnerBorder}"
	            BorderThickness="1">
                            <Path 
	              HorizontalAlignment="Center"
	              VerticalAlignment="Center"
	              Fill="{StaticResource ScrollBarInnerBorder}"
	              Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
                        </Border>
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource HoverBackground}" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBackground}" />
                        </Trigger>
                        <!--<Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>-->
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="Transparent" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border
		  	Name="OuterBorder" 
            CornerRadius="3" 			
            BorderBrush="{StaticResource ScrollBarOuterBorder}"
            BorderThickness="1" >
                        <Border 
				Name="Border"
	            CornerRadius="2" 			
	            Background="{TemplateBinding Background}"
	            BorderBrush="{StaticResource ScrollBarInnerBorder}"
	            BorderThickness="1" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource HoverBackground}" />
                        </Trigger>
                        <!--<Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>-->
                    </ControlTemplate.Triggers>
                </ControlTemplate>

            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="VerticalScrollBarThumb" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Border
		  	Name="OuterBorder" 
            CornerRadius="3" 			
            BorderBrush="{StaticResource ScrollBarOuterBorder}"
            BorderThickness="1" >
                        <Border 
				Name="Border"
	            CornerRadius="2" 			
	            Background="{TemplateBinding Background}"
	            BorderBrush="{StaticResource ScrollBarInnerBorder}"
	            BorderThickness="1" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="true">
                            <Setter TargetName="Border" Property="Background" Value="{StaticResource VerticalHoverBackground}" />
                        </Trigger>
                        <!--<Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>-->
                    </ControlTemplate.Triggers>
                </ControlTemplate>

            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid >
            <Grid.RowDefinitions>
                <RowDefinition MaxHeight="18"/>
                <RowDefinition Height="0.00001*"/>
                <RowDefinition MaxHeight="18"/>
            </Grid.RowDefinitions>
            <Border
        Grid.RowSpan="3"
        CornerRadius="0" 
        Background="{x:Null}" />
            <RepeatButton 
        Grid.Row="0"                           
        Style="{StaticResource ScrollBarLineButton}"
        Height="18"
        Command="ScrollBar.LineUpCommand"
        Content="M 0 4 L 8 4 L 4 0 Z" Margin="0,0,0,0" />
            <Track 
        Name="PART_Track"
        Grid.Row="1"
        IsDirectionReversed="true">
                <Track.DecreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageUpCommand" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb 
            Style="{StaticResource VerticalScrollBarThumb}" 
            Margin="0,1"  
            Background="{StaticResource ScrollBarButtonsBackground}"/>
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageDownCommand" />
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton 
        Grid.Row="3" 
        Style="{StaticResource ScrollBarLineButton}"
        Height="18"
        Command="ScrollBar.LineDownCommand"
        Content="M 0 0 L 4 4 L 8 0 Z"/>
        </Grid>
    </ControlTemplate>

    <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition MaxWidth="18"/>
                <ColumnDefinition Width="0.00001*"/>
                <ColumnDefinition MaxWidth="18"/>
            </Grid.ColumnDefinitions>
            <Border
        Grid.ColumnSpan="3"
        CornerRadius="0" 
         />
            <RepeatButton 
        Grid.Column="0"                           
        Style="{StaticResource ScrollBarLineButtonHorizontal}"
        Width="18"
        Command="ScrollBar.LineLeftCommand"
        Content="M 4 0 L 4 8 L 0 4 Z" />
            <Track 
        Name="PART_Track"
        Grid.Column="1"
        IsDirectionReversed="False">
                <Track.DecreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageLeftCommand"/>
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb 
            Style="{StaticResource ScrollBarThumb}" 
            Margin="1,0"  
            Background="{StaticResource HorizontalScrollBarButtonsBackground}" />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageRightCommand"/>
                </Track.IncreaseRepeatButton>
            </Track>
            <RepeatButton 
        Grid.Column="3" 
        Style="{StaticResource ScrollBarLineButtonHorizontal}"
        Width="18"
        Command="ScrollBar.LineRightCommand"
        Content="M 0 0 L 4 4 L 0 8 Z"/>
        </Grid>
    </ControlTemplate>

    <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Width" Value="Auto"/>
                <Setter Property="Height" Value="18" />
                <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
            </Trigger>
            <Trigger Property="Orientation" Value="Vertical">
                <Setter Property="Width" Value="18"/>
                <Setter Property="Height" Value="Auto" />
                <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
            </Trigger>
        </Style.Triggers>
    </Style>

</ResourceDictionary>